//
//  HXCategoryDetaiilCell.m
//  ZCooking
//
//  Created by 韩旭 on 16/9/20.
//  Copyright © 2016年 HX_. All rights reserved.
//

#import "HXCategoryDetaiilCell.h"
#import "HX_Macro.h"
#import "HXCategoryDataModel.h"
#import "HXTagsModel.h"
@implementation HXCategoryDetaiilCell
- (void)setArrBtn:(NSMutableArray *)arrBtn {
    _arrBtn = arrBtn;
    [self setUp];
}
- (void)setUp {
        for (int i = 0; i < self.arrBtn.count; i++) {
            UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
            btn.frame = CGRectMake(30 + i * 60, 190, 60, 20);
            btn.backgroundColor = [UIColor whiteColor];
            btn.titleLabel.numberOfLines = 0;
            btn.titleLabel.font = [UIFont systemFontOfSize:11];
            HXTagsModel *tagModel = self.arrBtn[i];
            [btn setTitle:tagModel.text forState:UIControlStateNormal];
            [btn setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
            [self.contentView addSubview:btn];
        }
}
- (void)setDetailModel:(HXCategoryDataModel *)detailModel {
    _detailModel = detailModel;
    [self.headerImg sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@", detailModel.image]]];
    self.name.text = detailModel.title;
    self.detail.text = detailModel.Description;
    self.personCount.text = [NSString stringWithFormat:@"%@人做过", detailModel.play];
}
- (void)awakeFromNib {

  
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
